import request from "@/utils/request.js";

// 获取分类列表
export const getCategoryListService = (params) => {
    return request.get('/category', {params: params})
}

// 新增分类
export const addCategoryService = (data) => {
    return request.post('/category', data)
}

// 删除分类
export const deleteCategoryService = (id) => {
    return request.delete(`/category/${id}`)
}

// 批量删除分类
export const deleteCategoryBatchService = (ids) => {
    return request.post('/category/deleteBatch', {ids});
}

// 修改分类
export const updateCategoryService = (data) => {
    return request.put('/category', data)
}